Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>The setFullYear() method sets a date object to a special date.</p> <p>Remember that JavaScript counts months from 0 to 11. Month 10 is November.</p> <p id="demo"></p> <script> var d = new Date(); d.setFullYear(2020, 0, 14); document.getElementById("demo").innerHTML = d; </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_date_setfullyear by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:24:19 GMT --> </html>
Result:
Try it Yourself - © w3schools.com